
<!DOCTYPE html>
<html class="signin no-js" lang="{{lang}}">

	<head>
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="renderer" content="webkit">
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1, maximum-scale=1">
		<meta name="description" content="{{ config.setup.appName }}">
		<meta name="keywords" content="node,nodejs,shop">
		<title>{{ config.setup.appName }}</title>
		{% if ctx.app.env === 'production' %}
		
		<link rel="stylesheet" href="/assets/min/production.min.css">
		
		{% else %}
		<link rel="stylesheet" href="/assets/plugins/stepy/jquery.stepy.css">
		<link rel="stylesheet" href="/assets/bootstrap/css/bootstrap.css">
		<link rel="stylesheet" href="/assets/css/font-awesome.css">
		<link rel="stylesheet" href="/assets/css/themify-icons.css">
		<link rel="stylesheet" href="/assets/css/animate.css">
		<link rel="stylesheet" href="/assets/css/skins/palette.css">
		<link rel="stylesheet" href="/assets/css/fonts/font.css">
		<link rel="stylesheet" href="/assets/css/main.css">
		<link rel="stylesheet" href="/assets/css/panel.css">
		<link rel="stylesheet" href="/assets/plugins/jstree/themes/default/style.css">
		<link rel="stylesheet" href="/assets/plugins/treetable/jquery.treetable.css">
		
		<link rel="stylesheet" href="/assets/plugins/datatables/dataTables.bootstrap.css">
		<link rel="stylesheet" href="/assets/plugins/chosen/chosen.css">
		<link rel="stylesheet" href="/assets/plugins/datepicker/bootstrap-datetimepicker.css">
		<link rel="stylesheet" href="/assets/plugins/emoji/emoji.css">
		<link rel="stylesheet" href="/assets/plugins/x-editable/bootstrap-editable.css"> 
		{% endif %}
		<!--[if lt IE 9]>
  <script src="/assets/js/html5shiv.js"></script>
  <script src="/assets/js/respond.min.js"></script>
  <script src="/assets/js/json2.js"></script>
  <![endif]-->
		{% if user.login_theme %}
		<link rel="stylesheet" href="/assets/css/skins/{{ user.login_theme }} " id="skin"> {% endif %}
		<script src="/assets/plugins/jquery-1.11.1.min.js"></script>

	</head>

	<body>
		<div class="gallery-loader" style="background-color:transparent;">
			<div class="loader"></div>
		</div>

		<div class="playground hidden-xs">
			<div class="options">
				<div class="pg-close ti-close"></div>
				<div class="options-container color-options">
					<h6>主题</h6>
					<a onclick="sublime.changeTheme('palette.css')" href="/assets/css/skins/palette.css" class="css_orange cs_color cs_1 {% if not user.login_theme or 'palette.css' == user.login_theme %}active{% endif %}">
						<div></div>
						<div></div>
						<div></div>
						<div></div>
					</a>
					<a onclick="sublime.changeTheme('palette.2.css')" href="/assets/css/skins/palette.2.css" class="css_orange cs_color cs_2 {% if 'palette.2.css' == user.login_theme %}active{% endif %}">
						<div></div>
						<div></div>
						<div></div>
						<div></div>
					</a>
					<a onclick="sublime.changeTheme('palette.3.css')" href="/assets/css/skins/palette.3.css" class="css_orange cs_color cs_3 {% if 'palette.3.css' == user.login_theme %}active{% endif %}">
						<div></div>
						<div></div>
						<div></div>
						<div></div>
					</a>
					<a onclick="sublime.changeTheme('palette.4.css')" href="/assets/css/skins/palette.4.css" class="css_orange cs_color cs_4 {% if 'palette.4.css' == user.login_theme %}active{% endif %}">
						<div></div>
						<div></div>
						<div></div>
						<div></div>
					</a>
				</div>
				<div class="options-container">
					<h6>布局</h6>
					<a class="pg-val toggle-sidebar toggle-active {% if user.login_sidebar %}active{%endif%}" href="javascript:;">
						<img src="/assets/img/panel/small.png" alt="">
					</a>
					<a class="pg-val toggle-scroll toggle-active {% if user.login_scroll %}active{%endif%}" href="javascript:;">
						<img src="/assets/img/panel/scroll.png" alt="">
					</a>
					<a class="pg-val toggle-boxed toggle-active {% if user.login_boxed %}active{%endif%}" href="javascript:;">
						<img src="/assets/img/panel/boxed.png" alt="">
					</a>
				</div>
				<small class="pg-footer"><i class="ti-info-alt mr5"></i>自定义皮肤和布局</small>
			</div>
		</div>
		<div class="app {% if user.login_sidebar%}small-menu{% endif %} {% if user.login_scroll%}fixed-scroll{% endif %} {% if user.login_boxed%}boxed{% endif %}">
			<header class="header header-fixed navbar">
				<div class="brand">

					<a href="javascript:;" class="ti-menu off-left visible-xs" data-toggle="offscreen" data-move="ltr"></a>

					<a href="" data-pjax class="navbar-brand">
						<img src="/assets/img/logo.png" alt="">
						<span class="heading-font">
                {{ config.setup.appShortName }}
                </span>
					</a>

				</div>
				<ul class="nav navbar-nav navbar-left">
					<li class="hidden-xs">

						<a href="javascript:;" class="toggle-sidebar">
							<i class="ti-menu"></i>
						</a>

					</li>

				</ul>
				<ul class="topnav nav navbar-nav hidden-xs">

					{% if firstMenus %} 
					{% for firstMenu in firstMenus %}
					<li class="dropdown">
						<a href="javascript:;" data-toggle="dropdown">
							{% if firstMenu.icon %}
							<i class="{{ firstMenu.icon }}"></i> {% endif %}
							<span>{{ firstMenu.name }}</span>
							<b class="caret"></b>
						</a>
						<ul class="dropdown-menu">
							{% if secondMenus[firstMenu.id] %} 
							{% for secondMenu in secondMenus[firstMenu.id] %}

							<li class="dropdown">
								<a href="{% if secondMenu.url %} {{secondMenu.url}} {%else %}javascript:;{% endif %}">
									{% if secondMenus[secondMenu.id] %} <i class="toggle-accordion"></i> {% endif %}
									<span>{{ secondMenu.name }} </span>
								</a>
								{% if secondMenus[secondMenu.id] %}
								<ul class="sub-menu">
								
									{% for thirdMenu in secondMenus[secondMenu.id] %}
									<li class="clearfix">
										<a {% if thirdMenu.url %} href="
											{{ thirdMenu.url }} " {% else %} href="javascript:;" {% endif %}>
											<span>{{ thirdMenu.name }} </span>
										</a>
									</li>
									{% endfor %}
								</ul>
								{% endif %}
							</li>
							{% endfor %}
{% endif %}
						</ul>
					</li>
					{% endfor %}
{% endif %}
				</ul>
				<ul class="nav navbar-nav navbar-right">
					<!--通知位置-->

					<li class="off-right">
						<a href="javascript:;" data-toggle="dropdown">
							<span class="hidden-xs ml10">{{ user.nickname }} </span>
							<i class="ti-angle-down ti-caret hidden-xs"></i>
						</a>
						<ul class="dropdown-menu animated fadeInLeft">
							<li>
								<a href="/system/user/custom" data-toggle="modal" data-target="#homeDetail">
									编辑常用菜单
								</a>
							</li>

							<li class="dropdown hidden-xs">
								<a href="javascript:;" class="pg-toggle">
									修改页面布局
								</a>
							</li>
							<li>
								<a href="/system/user/password" data-toggle="modal" data-target="#homeDetail">
									修改登录密码
								</a>
							</li>
						</ul>
					</li>
					<li class="off-right">
						<a href="/system/user/logout">
							<i class="ti-power-off"></i>
						</a>
					</li>
				</ul>
			</header>
			<section class="layout">

				<aside class="sidebar offscreen-left">

					<nav class="main-navigation" data-height="auto" data-size="6px" data-distance="0" data-rail-visible="true" data-wheel-step="10">
						<!--<p class="nav-title">MENU</p>-->
						<ul class="nav">
							<li class="open">
								<a href="javascript:;">
									{% if customMenus and customMenus.length>0 %}
									<i class="toggle-accordion"></i> {% endif %}
									<i class="ti-heart"></i>
									<span>常用菜单</span>
								</a>
							{% if customMenus and customMenus.length>0 %}
								<ul class="sub-menu">
										{% for menu in customMenus %}

									<li class="active">
										<a {% if menu.url %} href="{{menu.url}} " {% if 'data-pjax'==menu.target %} data-pjax{% endif %} {% else %} href="javascript:;" {% endif %}>
											<span>{{menu.name}} </span>
										</a>
									</li>

									{% endfor %}
								</ul>
								{% endif %}
							</li>
							
							
							{% if (menuCode | split(":")).length > 2 and secondMenus[menuRoot] %} 
							
							{% for firstMenu in secondMenus[menuRoot] %} 
							
							<li {% if menuCode==firstMenu.code %} class="active" {% elif menuCode.indexOf(firstMenu.code) ==0  %} class="open" {% endif %}>
								<a {% if firstMenu.url %} href="
									{{ firstMenu.url }} " {% if 'data-pjax'==firstMenu.target %} data-pjax {% endif%} {% else %} href="javascript:;" {% endif %}>
									{% if secondMenus[firstMenu.id] %}
									<i class="toggle-accordion"></i> {% endif %} {% if firstMenu.icon %}
									<i class="{{ firstMenu.icon }} "></i> {% else %}
									<i class="ti-map"></i> {% endif %}
									<span>{{ firstMenu.name }} </span>

								</a>
								{% if secondMenus[firstMenu.id] %}
								<ul class="sub-menu">
									{% for secondMenu in secondMenus[firstMenu.id] %}

									<li {% if menuCode==secondMenu.code %} class="active" {% elif menuCode.indexOf(secondMenu.code)==0 %} class="open" {% endif %}>
										<a {% if secondMenu.url %} href="
											{{ secondMenu.url }} " {% if 'data-pjax'==secondMenu.target %} data-pjax {% endif %} {% else %} href="javascript:;" {% endif %}>
											
											<!--{% if secondMenus[secondMenu.id].length > 0 %}
											<i class="toggle-accordion"></i> {% endif %}-->
											<span>{{ secondMenu.name }} </span>
										</a>
									</li>

									{% endfor %}
								</ul>
								{% endif %}
							</li>
							{% endfor %} 
							{% endif %}

						</ul>
					</nav>
				</aside>
				<section class="main-content" id="container">
					
					{% block content %}{% endblock %}
				</section>
			</section>

		</div>
		<div id="homeDetail" class="modal fade bs-modal-sm" tabindex="-1" role="dialog" aria-hidden="true">
			<div class="modal-dialog">
				<div class="modal-content">
				</div>
			</div>
		</div>
		
		<!--script-->
		{% if ctx.app.env === 'production' %}
		<script src="/assets/min/production.min.js"></script>
		{% if ctx.url.indexOf('weixin')>0 %}
		<script src="/assets/plugins/ueditor/ueditor.configWx.js"></script>
		{% else%}
		<script src="/assets/plugins/ueditor/ueditor.config.js"></script>
		{% endif %}
		<script src="/assets/plugins/ueditor/ueditor.all.min.js"></script>
		<script src="/assets/plugins/parsley.js"></script>
		<script src="/assets/plugins/parsley.zh_cn.js"></script>
		{% else%}
		
		<script src="/assets/plugins/layer/layer.js"></script>
		<script src="/assets/plugins/modernizr.js"></script>
		<script src="/assets/js/jquery.pjax.js"></script>
		<script src="/assets/bootstrap/js/bootstrap.js"></script>
		<script src="/assets/plugins/jquery.form.js"></script>
		<script src="/assets/plugins/bootstrap-tagsinput/bootstrap-tagsinput.js"></script>
		<script src="/assets/plugins/parsley.js"></script>
		<script src="/assets/plugins/parsley.zh_cn.js"></script>
		<script src="/assets/plugins/jquery.sortable.js"></script>
		<script src="/assets/plugins/jquery.nestable.js"></script>
		<script src="/assets/plugins/icheck/icheck.js"></script>
		<script src="/assets/plugins/jquery.slimscroll.js"></script>
		<script src="/assets/plugins/jquery.easing.js"></script>
		<script src="/assets/plugins/appear/jquery.appear.js"></script>
		<script src="/assets/plugins/jquery.placeholder.js"></script>
		<script src="/assets/plugins/fastclick.js"></script>
		<script src="/assets/plugins/count-to/jquery.countTo.js"></script>
		<script src="/assets/js/toast.js"></script>
		<script src="/assets/plugins/chosen/chosen.jquery.js"></script>
		<script src="/assets/plugins/treetable/jquery.treetable.js"></script>
		<script src="/assets/plugins/datatables/jquery.dataTables.js"></script>
		<script src="/assets/plugins/datatables/dataTables.bootstrap.js"></script>
		<script src="/assets/plugins/jstree/jstree.js"></script>
		<script src="/assets/plugins/switchery/switchery.js"></script>
		<script src="/assets/plugins/stepy/jquery.stepy.js"></script>
		<script src="/assets/plugins/stepy/jquery.validate.js"></script>
		<script src="/assets/plugins/icheck/icheck.js"></script>
		<script src="/assets/plugins/chosen/chosen.jquery.js"></script>
		<script src="/assets/plugins/jquery.form.js"></script>
		<script src="/assets/plugins/jquery.serializejson.js"></script>
		<script src="/assets/plugins/uploadifive/jquery.uploadifive.js"></script>
		<script src="/assets/plugins/laydate/laydate.js"></script>
	
		<script src="/assets/plugins/emoji/emoji.js"></script>
		<script src="/assets/plugins/sorttable/Sortable.js"></script>
		<script src="/assets/plugins/jquery.qrcode.js"></script>
		<script src="/assets/plugins/jquery.sparkline.js"></script>
		<script src="/assets/plugins/x-editable/bootstrap-editable.js"></script>
		{% if ctx.url.indexOf('weixin')>0 %}
		<script src="/assets/plugins/ueditor/ueditor.configWx.js"></script>
		{% else %}
		<script src="/assets/plugins/ueditor/ueditor.config.js"></script>
		{% endif %}
		<script src="/assets/plugins/ueditor/ueditor.all.min.js"></script>
		<script src="/assets/js/form.js"></script>
		<script src="/assets/js/offscreen.js"></script>
		<script src="/assets/js/main.js"></script>
		<script src="/assets/js/page.js"></script>
		<script src="/assets/js/date.js"></script>
		{% endif %}
		<script type="text/javascript">
			$(document).ready(function() {
				if($.support.pjax) {
					$(document).pjax('a[data-pjax]', '#container', {
						maxCacheLength: 0,
						push: false,
						replace: true,
						fragment: '#container',
						timeout: 8000
					});
					$('.main-navigation a[data-pjax]').on('click', function() {
						$('.main-navigation a[data-pjax]').each(function() {
							$(this).parent().removeClass('active');
						});
						$(this).parent().addClass('active');
						
						
					});
					$(document).on('pjax:send', function() { //pjax链接点击后显示加载动画；
						
						$(".gallery-loader").fadeIn();
					});
					$(document).on('pjax:complete', function() { //pjax链接加载完成后隐藏加载动画；
						
						setTimeout(function() {
							$(".gallery-loader").fadeOut()
						}, 250);
						
					});
				}
				try {
					$(".gallery-loader").fadeOut();
				} catch(e) {}
				$('#homeDetail').on('hidden.bs.modal', function() {
					$(this).removeData("bs.modal");
				});
				if(console)
					console.log("%c^_^ ", "color:red;font-size:14px;");
			});
		</script>
		<!--script-->
	</body>

</html>


